<template>
  <div>
    <div class="footer_wrap">
      <!-- <a href="#/find">发现音乐</a>
      <a href="#/my">我的音乐</a>
      <a href="#/part">朋友</a> -->
      <span @click="open('/find','find')">发现音乐</span>
      <span @click="open('/my','my')">我的音乐</span>
      <span @click="open('/part','friend')">朋友</span>
    </div>
    <div class="top">
      <!-- 路由出口 -->
      <router-view></router-view>
    </div>
  </div>
</template>

<script>
export default {
  methods:{
    open(path,name){
      // this.$router.push({
      //   path:path,
      //   // name:name,
      //   query:{
      //     id:12
      //   }
      // });
      this.$router.push({
        name,
        params:{
          name:"王金博"
        }
      });
    }
  }
};
</script>

<style scoped>
.footer_wrap {
  position: fixed;
  left: 0;
  top: 0;
  display: flex;
  width: 100%;
  text-align: center;
  background-color: #333;
  color: #ccc;
}
.footer_wrap span {
  flex: 1;
  text-decoration: none;
  padding: 20px 0;
  line-height: 20px;
  background-color: #333;
  color: #ccc;
  border: 1px solid black;
}
.footer_wrap span:hover {
  background-color: #555;
}
.top {
  padding-top: 62px;
} 
.active {
  background-color: #555 !important;
}
</style>